Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to google_compute_target_pool for health checks self_link #702

Merged
merged 2 commits into from
Nov 8, 2017

Conversation

rosbo
Copy link
Contributor

@rosbo rosbo commented Nov 8, 2017

Instead of requiring the health check name. It now accepts the self_link or the name.

I added:

  • Accepts self_link in addition of health check name
  • Removes the need for an API call to generate the self link
  • Improves the documentation to mention that only the legacy google_compute_http_health_check is supported. This will prevent our user from being stuck like mentioned here: Update compute_health_check.html.markdown #300.
  • Adds a MaxItems:1 in the schema. You can't have more than one. The API will fail. The official docs also says so.
  • Adds a check to the acceptance test to ensure the health checks are properly setup.

@rosbo rosbo requested a review from danawillow November 8, 2017 00:39
@rosbo
Copy link
Contributor Author

rosbo commented Nov 8, 2017

TF_ACC=1 go test ./google -v -run TestAccComputeTargetPool_basic -timeout 120m
=== RUN   TestAccComputeTargetPool_basic
--- PASS: TestAccComputeTargetPool_basic (72.02s)
PASS


hcLink := healthCheckRes.Primary.Attributes["self_link"]
if targetPoolRes.Primary.Attributes["health_checks.0"] != hcLink {
return fmt.Errorf("Health check not set up. Expected '%s'", hcLink)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi: '%s' is equivalent to %q (up to you if you want to change it)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

@rosbo rosbo merged commit ff184b8 into hashicorp:master Nov 8, 2017
@rosbo rosbo deleted the target-pool-docs branch November 8, 2017 17:11
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
…hashicorp#702)

- Accepts self_link in addition of health check name
- Removes the need for an API call to generate the self link
- Improves the documentation to mention that only the legacy google_compute_http_health_check is supported. This will prevent our user from being stuck like mentioned here: hashicorp#300.
- Adds a MaxItems:1 in the schema. You can't have more than one. The API will fail. The official docs also says so.
- Adds a check to the acceptance test to ensure the health checks are properly setup.
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
Signed-off-by: Modular Magician <[email protected]>
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants